/**
 * 
 */
package org.cuatrovientos.erp.model;


import javax.validation.constraints.Min;
import javax.validation.constraints.Size;
import java.sql.Date;
/**
 * @author eneko_lana
 *
 */
public class Message {
	
	private int id;
	
	@Size(min=1,max=50,message="{shipment.title.error}")
	private String title;
	
	@Size(min=1,message="{shipment.message.error}")
	private String message;

	private java.sql.Date date;
	
	@Min(value=1,message="{shipment.iduser.error}")
	private int iduser;
	
	public Message () {
		
	}
	
	public Message(int id, String title, String message,
			Date date, int iduser) {
		this.id = id;
		this.title = title;
		this.message = message;
		
		this.date = date;
		this.iduser = iduser;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public java.sql.Date getDate() {
		return date;
	}

	public void setDate(java.sql.Date date) {
		this.date = date;
	}

	public int getIduser() {
		return iduser;
	}

	public void setIduser(int iduser) {
		this.iduser = iduser;
	}

	@Override
	public String toString() {
		return "Message [id=" + id + ", title=" + title + ", message="
				+ message + ", date=" + date + ", iduser=" + iduser + "]";
	}

	
	

}
